package com.test.designPattern.behaviorType.commandPattern;



/**
 * 命令模式测试
 *
 * @author wangjie
 * @version V1.0
 * @date 2020/4/8
 */
public class Client {

    public static void main(String[] args) {

        Cook cook = new Cook();
        Command command1 = new ScrambledEggWithTomatoCommand(cook);
        Command command2 = new ScrambledEggWithChineseChivesCommand(cook);
        Waiter waiter = new Waiter();


        waiter.setOrder(command1);
        waiter.setOrder(command2);
        waiter.notifyCook();
    }
}
